package com.car.tx;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import com.car.common.DefaultConfig;
import com.jfinal.kit.PropKit;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.DbKit;
import com.jfinal.plugin.activerecord.ICallback;
import com.jfinal.plugin.druid.DruidPlugin;

public class UserWrap2 implements ICallback {
	private String id;
	private String user_mobile;
	private String user_password;
	
	public UserWrap2(String user_mobile,String user_password,String id) {
		this.id= id;
		this.user_mobile = user_mobile;
		this.user_password = user_password;
	}
	

	@Override
	public Object call(Connection conn) throws SQLException {
		CallableStatement proc = null;
		try {
			proc = (CallableStatement) conn.prepareCall("{ call wrap_password_users(?,?,?) }"); // borrow为mysql的存储过程名，其中有两个参数，两个返回值
			proc.setString(1, this.user_mobile);// 设置参数值
			proc.setString(2, this.user_password);
			proc.setString(3, this.id);
			proc.execute();

		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			conn.close();
		}
		return null;
	}
	

}
